package com.Test;

import java.time.LocalDateTime;

public class DateComparison {
    public static void main(String[] args) {

        // 创建要比较的日期
        LocalDateTime targetDateTime = LocalDateTime.of(2024, 9, 5, 16, 50, 0);

        // 创建待比较的日期（示例中用当前时间）
        LocalDateTime dateToCompare = LocalDateTime.now();

        // 进行比较
        if (targetDateTime.isBefore(dateToCompare)) {
            System.out.println("The date is before 2024-09-05 16:50:00");
        } else {
            System.out.println("The date is after 2024-09-05 16:50:00");
        }
    }
}
